/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package idea.iquest.explorer;


import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
import org.openide.util.NbBundle;
import static idea.iquest.explorer.Bundle.*;
import java.util.List;
import javax.swing.Action;
import org.openide.util.Utilities;


/**
 *
 * the root node for Questionnaires
 * @author rejun001
 */
public class IQuestionnairesRootNode extends AbstractNode
{
    /**
     * xtor -- attaches the children to the root node
     * @param kids 
     */
    @NbBundle.Messages("CTRL_RootName=questionnaires_table")
    public IQuestionnairesRootNode(Children kids) {
        super(kids);
        setDisplayName(CTRL_RootName());
    }
    
    /**
     * get the Actions for the questionnaires
     * @param context
     * @return 
     */
    @Override
    public Action[] getActions(boolean context) {
        List<? extends Action> actionsForQuestionnaires = Utilities.actionsForPath( "Actions/Questionnaires");
        return actionsForQuestionnaires.toArray(new Action[actionsForQuestionnaires.size()]);
    } 
}
